package com.xuanyuanxinyu.func.gilde;

import android.text.TextUtils;

import com.bumptech.glide.load.model.GlideUrl;

/**
* @FileName:
* @Description: 带Key的缓存URL
* @author ken.luo
* @date 2023/4/4
* @version V1.0
* @email 424533553@qq.com
*/
public class CacheKeyGlideUrl extends GlideUrl {

    private final String eventId;

    public CacheKeyGlideUrl(String url, String eventId) {
        super(url);
        this.eventId = eventId;
    }

    @Override
    public String getCacheKey() {
        String cacheKey = super.getCacheKey();
        if (!TextUtils.isEmpty(eventId)) {
            return cacheKey + eventId;
        } else {
            return super.getCacheKey();
        }
    }

}
